﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<div class="panel">
                <div class="panel_header">
                    <div title="shopping cart" class="panel_header_cart">
                        <span>Giỏ hàng</span></div>
                </div>
                <div class="panel_para_cart">
                    <div id="content-shoppingcart">
                        <% List<Order> listOrder = (List<Order>)ViewData["ShoppingCart"];
                            double total = 0;
                            string link = "#";
                            if(listOrder.Count > 0)
                            {
                                link = "/thanh-toan.html";
                           foreach (Order item in listOrder)
                           {
                               total += item.SubTotal;
                               %>
                               <div class="minicartfield"><%= Html.Encode(item.ProductName)%></div>
                               <div class="minicartvalue"><%= String.Format("{0:0,0}", item.SubTotal)%></div>
                           <%}
                            }  %>
                    </div>
                    <br />
                    Tổng : <span id="cot-subtotal"><%= String.Format("{0:0,0}", total)%></span>
                    <br />
                    <a href="/gio-hang.html">Cập nhật</a>   |  
                    <a id='lnkOrder'  href="<%=link %>">Thanh toán</a> 
                </div>
                <div class="panel_footer">
                    <img src="../../../Themes/images/btm_cart.gif" /></div>
            </div>